
<%@ page import="comoabejas.Deal" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'deal.label', default: 'Deal')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.show.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">
                <table>
                    <tbody>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.id.label" default="Id" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: dealInstance, field: "id")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.address.label" default="Address" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: dealInstance, field: "address")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.area.label" default="Area" /></td>
                            
                            <td valign="top" class="value"><g:link controller="area" action="show" id="${dealInstance?.area?.id}">${dealInstance?.area?.name?.decodeHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.client.label" default="Client" /></td>
                            
                            <td valign="top" class="value"><g:link controller="client" action="show" id="${dealInstance?.client?.id}">${dealInstance?.client?.companyName?.decodeHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.conditions.label" default="Conditions" /></td>
                            
                            <td valign="top" class="value">${dealInstance?.conditions?.decodeHTML()}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.currentNumberOfUsers.label" default="Current Number Of Users" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: dealInstance, field: "currentNumberOfUsers")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.description.label" default="Description" /></td>
                            
                            <td valign="top" class="value">${dealInstance?.description?.decodeHTML()}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.details.label" default="Details" /></td>
                            
                            <td valign="top" class="value">${dealInstance?.details?.decodeHTML()}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.discountPrice.label" default="Discount Price" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: dealInstance, field: "discountPrice")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.endDate.label" default="End Date" /></td>
                            
                            <td valign="top" class="value"><g:formatDate format="dd-MM-yyyy" date="${dealInstance?.endDate}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.imageLink.label" default="Image Link" /></td>
                            
                            <td valign="top" class="value">
                            	<img class="Image" src="${createLink(controller:'image', action:'viewImage', id:dealInstance?.image?.id)}" />
                            </td>
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.normalPrice.label" default="Normal Price" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: dealInstance, field: "normalPrice")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.requiredNumberOfUsers.label" default="Required Number Of Users" /></td>
                            
                            <td valign="top" class="value">${fieldValue(bean: dealInstance, field: "requiredNumberOfUsers")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.startDate.label" default="Start Date" /></td>
                            
                            <td valign="top" class="value"><g:formatDate format="dd-MM-yyyy" date="${dealInstance?.startDate}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.title.label" default="Title" /></td>
                            
<!--                            <td valign="top" class="value">${fieldValue(bean: dealInstance, field: "title")}</td>-->
                            
                            <td valign="top" class="value">${dealInstance.title.decodeHTML()}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.voucherEndDate.label" default="Voucher End Date" /></td>
                            
                            <td valign="top" class="value"><g:formatDate format="dd-MM-yyyy" date="${dealInstance?.voucherEndDate}" /></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name"><g:message code="deal.voucherStartDate.label" default="Voucher Start Date" /></td>
                            
                            <td valign="top" class="value"><g:formatDate format="dd-MM-yyyy" date="${dealInstance?.voucherStartDate}" /></td>
                            
                        </tr>
                    
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${dealInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </g:form>
            </div>
        </div>
    </body>
</html>
